<template>
  <div class="card">
    <el-select
      style="width: 100%"
      v-model="value"
      placeholder="请选择"
      @change="$emit('do', value)"
    >
      <el-option
        v-for="item in nameList"
        :key="item"
        :label="item"
        :value="item"
      >
      </el-option>
    </el-select>
  </div>
</template>

<script>
export default {
  name: "nameSelectView",
  props: ["initValue"],
  data() {
    return {
      value: "",
    };
  },
  computed: {
    nameList() {
      return this.$store.state.nameList;
    },
  },
  mounted() {
    this.value = this.initValue;
  },
};
</script>

<style scoped>
.card {
  padding: 18px 32px;
  position: fixed;
  z-index: 5;
  top: 80px;
  left: 10vw;
  right: 10vw;
  /* width: 120px; */
  /* max-width: 90vw; */
  background-color: #EBEEF5;
  /* border: solid 1px #aaa; */
  border-radius: 45px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.25);
  opacity: 0.5;
  /* filter: blur(2px); */
  transform: scale(0.99, 0.98);
  transition: all 0.5s ease;
}
.card:hover {
  background-color: #F2F6FC;
  transform: scale(1, 1);
  opacity: 1;
  /* width: 150px; */
  filter: blur(0);

  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}
</style>